import logging
import yagmail


def log_set():
    logging.basicConfig(filename='gouwuche.txt',filemode='w+',level=logging.DEBUG,format="%(asctime)s->%(levelname)s->%(message)s")


def send_mail(f):
    mail=yagmail.SMTP(user='1419002374@qq.com',password='yoaavwxvrfhliadf',host='stmp.qq.com')


    mail.send(to='1419002374@qq.com',subject='自动化测试',contents='今日报告',attachments=f)